local StoryComposite = require("gameLogic.story.behavior.StoryComposite")
local StorySequence = class("StorySequence", StoryComposite)

function StorySequence:ctor()
    StorySequence.super.ctor(self)
    self._curCount = 1
end

function StorySequence:_active()
    local curNode = self._children[self._curCount]
    curNode:tick()
    if curNode:isDone() then
        self._curCount = self._curCount + 1
        if self._curCount > #self._children then
            self:setDone(true)
            printDebug(" StorySequence:_active() Done")
        end
    end
end

return StorySequence
